<?php
/**
 * @package		简易CMS
 * @subpackage	系统外部通讯接口
 * @version		$Id: api.php 11 2012-06-07 16:49:28Z htmambo@gmail.com $
 * @author		Hoping
 * @copyright	Copyright (C) 2010 Hoping Software Studio.
 */


define('IN_API', true);
define('CURSCRIPT', 'api');

$modarray = array('js' => 'javascript/javascript', 'ad' => 'javascript/advertisement', 'api' => 'api');

$mod = !empty($_GET['mod']) ? $_GET['mod'] : '';
if(empty($mod) || !array_key_exists($mod, $modarray)) {
	exit('Access Denied');
}

require_once './api/'.$modarray[$mod].'.php';

function loadcore() {
	global $_G, $mainframe;
	require_once './source/class/class_core.php';

	$mainframe = & cmsCore::instance();
	$mainframe->init_cron = false;
	$mainframe->init_session = false;
	$mainframe->init();
}
